package cn.gemiman.daoyi.module.iot.controller.admin.userequipment.vo;

import cn.gemiman.daoyi.framework.excel.core.annotations.DictFormat;
import cn.gemiman.daoyi.framework.excel.core.convert.DictConvert;
import cn.gemiman.daoyi.module.iot.controller.admin.userequipmentplace.vo.UserEquipmentPlaceRespVO;
import cn.gemiman.daoyi.module.iot.enums.DictTypeConstants;
import cn.gemiman.daoyi.module.member.api.user.dto.MemberUserRespDTO;
import cn.hutool.json.JSONObject;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 会员设备 Response VO")
@Data
@ExcelIgnoreUnannotated
public class UserEquipmentRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "5898")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "设备厂商", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "设备厂商", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.EQUIPMENT_MANUFACTURER)
    private Integer equipmentManufacturer;

    @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "12984")
    @ExcelProperty("设备编号")
    private Long equipmentId;
    @Schema(description = "设备信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private JSONObject equipment;

    @Schema(description = "场所编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10339")
    @ExcelProperty("场所编号")
    private Long placeId;
    @Schema(description = "场所信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private UserEquipmentPlaceRespVO place;

    @Schema(description = "会员编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1875")
    @ExcelProperty("会员编号")
    private Long memberUserId;
    @Schema(description = "会员信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private MemberUserRespDTO memberUser;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
